{if isset($error)}
<p>{$error}</p>
{else}

<a href="index.php?page=test"><< Nytt søk</>



{* Valg av dag *}
<div id="radiodays">
{foreach from=$week key=k item=day}
<div class="radioday{if $weekInNumbers[$k] == $date} selected{/if}">
	<a href="?page=test2&date={$weekInNumbers[$k]}{$placeStr}" />{$day}<br/>23.11.08</a>
</div>


{/foreach}


</div>

<div style="clear:both"></div>

{foreach from=$routes item=route key=index}
<div class="route-box">
{$route->getRouteType()}{$route->getRouteNumber()} {$route->getName()} <br />
<br />

{foreach from=$places[$index] item=place}
<div class="place" >

<h2>Varsel for {$place->getName()} {$selectedDay} {$date}</h2>
<br />

{section name="fcPer" loop=$id}

{if $id[fcPer] == 1}
{assign var=period value=$place->getPeriod1()}
{if $route->morningBest}
<div class="forecast-best" >
{else}
<div class="forecast-box" >
{/if}
{elseif $id[fcPer] == 2}
{assign var=period value=$place->getPeriod2()}
{if $route->midBest}
<div class="forecast-best" >
{else}
<div class="forecast-box" >
{/if}
{else}
{if $route->eveningBest}
<div class="forecast-best" >
{else}
<div class="forecast-box" >
{/if}
{assign var=period value=$place->getPeriod3()}
{/if}


{if $period != null}

{if $id[fcPer] == 1}
<h3><strong>Morgen</strong> kl 6 - kl 12</h3>
{elseif $id[fcPer] == 2}
<h3><strong>Dag</strong> kl 12 - kl 18</h3>
{else}
<h3><strong>Kveld</strong> kl 18 - kl 24</h3>
{/if}

<table>
	<tbody>
		<tr>
			<td class="w-icon">
				<!-- Ikoner og temperatur -->
								
				<img src='http://api.yr.no/weatherapi/weathericon/1.0/?symbol={$period->getWeatherSymbol()};content_type=image/png'  /> 

			</td>
		{if $period->getTemperature() > 0}
		<td class="plus">{$period->getTemperature()}&deg;</td>
		{else}
		<td class="minus">{$period->getTemperature()}&deg;</td>
		{/if}
		<td class="wind">
			<img src='http://www.yr.no/grafikk/pil.aspx?r={$period->getWindDir()}&h={$period->getWindSpeed()}' />
		
		</td>
		</tr>
	</tbody>
</table>	

<!-- Tekstbeskrivelse -->
<p>{$period->getWeatherSymbolTxt()}. {$period->getWindSpeedTxt()}. {$period->getWindSpeed()} m/s fra {$period->getWindDirTxt()}. {$period->getPrecipitation()} mm nedbør.</p> 
{else}
<p class="center">Starttidspunktet er passert</p>
{/if}

</div>
{/section}

</div> {* Slutter place-diven *}
{* Slutt place *}

{/foreach}
<div class="space"></div>
<div class='varsel'>
<h5>Vegmeldinger</h5>
{$route->getVegvesen()}
</div>


</div>
{* Slutt p� route *}
{/foreach}

{/if} {* Slutt på error-if *}